import request from '@/utils/request'

export function getOauthCode(data) {
  return request({
    url: '/wechat/oauth',
    method: 'get',
    params: data
  })
}

export function wxLogin(data) {
  return request({
    url: '/wechat/login',
    method: 'post',
    data: data
  })
}

export function passwordLogin(data) {
  return request({
    url: '/user/login/password',
    method: 'post',
    data: data
  })
}

export function sendCode(data) {
  return request({
    url: '/user/send_code',
    method: 'post',
    data: data
  })
}

export function codeLogin(data) {
  return request({
    url: '/user/login/code',
    method: 'post',
    data: data
  })
}

export function getUserInfo(data) {
  return request({
    url: '/user/member/info',
    method: 'get',
    params: data
  })
}

export function bind(data) {
  return request({
    url: '/user/bind',
    method: 'post',
    params: data
  })
}

export function personFans(data) {
  return request({
    url: 'user/fans/manage',
    method: 'get',
    params: data
  })
}

export function setpayWord(data) {
  return request({
    url: 'user/set_pay_password',
    method: 'post',
    params: data
  })
}
export function getRecommend(data) {
  return request({
    url: 'user/recommend',
    method: 'get',
    params: data
  })
}

export function gradePage(data) {
  return request({
    url: 'grade/page',
    method: 'get',
    params: data
  })
}

export function wechatInit(data) {
  return request({
    url: 'wx_sdk/init',
    method: 'get',
    params: data
  })
}

export function getParentInfo(data) {
  return request({
    url: 'user/parent',
    method: 'get',
    params: data
  })
}

export function getStoreName(data) {
  return request({
    url: 'user/store/info',
    method: 'get',
    params: data
  })
}
